1. Courses
  2. arrow-right
  3. ItemPath API
  4. arrow-right
  5. Section 4: Essential Calls
  6. arrow-right
  7. Getting & Updating Transactions

Getting & Updating Transactions

For getting transactions via the ItemPath API, there are a few helpful values to filter by. The full list of arguments is available in this reference here.

Date & Time Range

By setting creationDate to a range, you can get all transactions for the current or previous day, from the past week—any time frame of your choosing.

To get a range, use greater than [gt] and less than [lt] predicates. Here's an example for transactions from January 1 (later than January 1 at 00:00 and earlier than January 2 at 00:00).

/transactions?creationDate=[gt]2022-01-01&creationDate=[lt]2022-01-02

For transactions within a precise time window, you can add time in THH:MM:SS.MMMZ format. This example would get transactions between 1pm and 5pm on January 1.

/transactions?creationDate=[gt]2022-01-01T13:00:00.000000&creationDate=[lt]2022-01-01T17:00:00.000000

History Types & Motive Types

To choose the type of transactions you want to get, or check the motive—which gives a bit more information about what happened with the order—you can narrow by Type and Motive Type. These values and their descriptions are listed in this data table.

To get pick order transactions, you'd use this call:

/transactions?type=4

A common use for Motive Type is filtering out deleted orders, like this:

/transactions?motiveType=[not]5

Export State Type

With ItemPath's API, you can also see if transactions have been exported or not using the exportStateType key. The possible values for this key are listed in this data table.

To get all transactions that are ready to export, use this:

/transactions?exportStateType=2

Once transactions have been exported, you can use PUT to update the transaction's exportStateType from 2 to 4.

To try this, copy the ID of a transaction that is okay to modify. Put the change in the body of the request using the transaction ID, like the example below and this reference here.

curl -L
    -X PUT '[Your IP]/api/transactions/[ID]'
    -H 'Content-Type: application/json'
    -H 'Authorization: Bearer [Your JWT Access Token]'
    --data-raw '{"exportStateType": "4"}'